package com.hrpc.transport.message;

/**
 * 服务调用方发起的请求内容
 */
public class hRpcRequest {
    //请求ID
    private long requestId;
    //请求的类型，压缩的类型，序列化的方式
    private byte requestType;
    private byte compressType;
    private byte serializeType;

    private long timeStamp;

    //具体的消息体
    private RequestPayload requestPayload;

    public hRpcRequest(long requestId, byte requestType, byte compressType, byte serializeType, RequestPayload requestPayload) {
        this.requestId = requestId;
        this.requestType = requestType;
        this.compressType = compressType;
        this.serializeType = serializeType;
        this.requestPayload = requestPayload;
    }

    public hRpcRequest(long requestId, byte requestType, byte compressType, byte serializeType, long timeStamp) {
        this.requestId = requestId;
        this.requestType = requestType;
        this.compressType = compressType;
        this.serializeType = serializeType;
        this.timeStamp = timeStamp;
    }

    public long getRequestId() {
        return requestId;
    }

    public void setRequestId(long requestId) {
        this.requestId = requestId;
    }

    public byte getRequestType() {
        return requestType;
    }

    public void setRequestType(byte requestType) {
        this.requestType = requestType;
    }

    public byte getCompressType() {
        return compressType;
    }

    public void setCompressType(byte compressType) {
        this.compressType = compressType;
    }

    public byte getSerializeType() {
        return serializeType;
    }

    public void setSerializeType(byte serializeType) {
        this.serializeType = serializeType;
    }

    public long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(long timeStamp) {
        this.timeStamp = timeStamp;
    }

    public RequestPayload getRequestPayload() {
        return requestPayload;
    }

    public void setRequestPayload(RequestPayload requestPayload) {
        this.requestPayload = requestPayload;
    }

    public hRpcRequest() {
    }

    public hRpcRequest(long requestId, byte requestType, byte compressType, byte serializeType, long timeStamp, RequestPayload requestPayload) {
        this.requestId = requestId;
        this.requestType = requestType;
        this.compressType = compressType;
        this.serializeType = serializeType;
        this.timeStamp = timeStamp;
        this.requestPayload = requestPayload;
    }
}
